//
//  NewsFirstViewController.m
//  Today
//
//  Created by dllo on 15/5/25.
//  Copyright (c) 2015年 fanfan. All rights reserved.
//

#import "NewsFirstViewController.h"

@interface NewsFirstViewController ()

@end

@implementation NewsFirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"新闻详情";
    activity = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    activity.color = [UIColor grayColor];
    activity.frame = CGRectMake(0, 0, 200, 200);
    activity.center = self.view.center;
    [self.view addSubview:activity];
    [activity startAnimating];
    [self webview];
    
}
- (void)webview
{
    UIWebView *webview = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 64)];
    [self.view addSubview:webview];
    NSURL *url = [NSURL URLWithString:self.NewsUrl];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    
    [webview loadRequest:request];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
